Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introducing Simpletest code coverage #82

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

legovaer
Copy link

@legovaer legovaer commented Jun 4, 2016

Introduction

This PR will allow a user to generate code coverage reports for Simpletest executions.

Features

  • Generates a code coverage report using sebastianbergmann/phpcov which generates the same report as PHPUnit.
  • Automatically creates a new branch inside the GitHub repository in order to store the coverage report.
  • Generates a badge (optional) which indicates the percentage of the code which has been covered by simpletest

New Variables

This PR introduces several new variables to the .travis.yml file:

  • DRUPAL_TI_SIMPLETEST_COVERAGE - Can be set to "1" in order to enable the code coverage reports
  • DRUPAL_TI_SIMPLETEST_COVERAGE_GENERATE_BADGES- Can be set ti "1" in order to enable a badge which indicates the percentage of the code which has been covered by Simpletest
  • DRUPAL_TI_GITHUB_EMAIL - A secured variable containing the user's e-mail address
  • DRUPAL_TI_GITHUB_EMAIL - A secured variable containing the user's full name
  • DRUPAL_TI_GITHUB_EMAIL - A secured variable containing the user's application token

Examples

Currently I have a very good example of the power of this PR:

Todo

  • Test with a D8 module
  • PHPUnit & Simpletest results should get merged

Open pull requests

Nice-to-have

  • Publish results to coveralls.io

@legovaer
Copy link
Author

legovaer commented Jun 4, 2016

Some of the tests fail because the Github credentials are not part of the .travis.yml file. Shall I use mine? I do need an application token form your end however.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling b48b627 on legovaer:add-coverage-support into 9b1253d on LionsAd:master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants